package kr.go.nih.biomedi.pSEVA.bean;

import java.util.ArrayList;

public class BWA {

	private static BWA instance = new BWA();
	
	private String reference;
	private String nodeN;
	private String se_pe;
	private String realFolder;
	private String inputFile;
	private String FieldSeparator=",";

	public String getReference() {
		return reference;
	}
	public void setReference(String reference) {
		this.reference = reference;
	}
	public String getNodeN() {
		return nodeN;
	}
	public void setNodeN(String nodeN) {
		this.nodeN = nodeN;
	}
	public String getSe_pe() {
		return se_pe;
	}
	public void setSe_pe(String se_pe) {
		this.se_pe = se_pe;
	}
	public String getRealFolder() {
		return realFolder;
	}
	public void setRealFolder(String realFolder) {
		this.realFolder = realFolder;
	}
	public String getInputFile() {
		return inputFile;
	}
	public void setInputFile(String inputFile) {
		this.inputFile = inputFile;
	}
	
	private static BWA getInstance() {
		if (instance == null) {
			return new BWA();
		} else {
			return instance;
		}
	}
	
	public String doBWAalnExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" + FieldSeparator + "/ldata/home/tslinux/Programs/bwa-0.5.9/bwa aln -t12 /ldata/home/tslinux/Genomes/Human/bwa_hg19/chr_all.fa "
			  + this.getRealFolder() + "/" + this.getInputFile() + " > " + this.getRealFolder() + "/" + this.getInputFile() + ".sai";
		return strCmd;
	}
	
	public String doBWAsamseExecute() {
		String strCmd = "/bin/sh" + FieldSeparator + "-c" +FieldSeparator + "/ldata/home/tslinux/Programs/bwa-0.5.9/bwa samse /ldata/home/tslinux/Genomes/Human/bwa_hg19/chr_all.fa "
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sai " + this.getRealFolder() + "/" + this.getInputFile() + " > "
			  + this.getRealFolder() + "/" + this.getInputFile() + ".sam";
		return strCmd;
	}
}
